#ifndef _MESSAGE_ROUTER_MOCK_H_
#define _MESSAGE_ROUTER_MOCK_H_
#include "ILogger.h"
#include "MessageRouter.h"
#include "mock/LoggerMock.h"

using ::testing::_;

class MessageRouterMock : public MessageRouter{
public:
	LoggerMock logger;
	MessageRouterMock() : MessageRouter(logger) {
		EXPECT_CALL(*this, addService(_)).Times(AnyNumber());
	}
	MOCK_METHOD2(postMessage, void(const IService& sender, const String& msg));
	MOCK_METHOD1(broadcastMessage, void(const String& msg));
	MOCK_METHOD1(addService, void(IService& s));	
	MOCK_METHOD1(tick, void(long s));
	MOCK_METHOD1(removeService, IService*(const String& name));
	MOCK_CONST_METHOD0(getServicesSize, int());
	MOCK_CONST_METHOD1(getService, const IService* (int));
};

bool operator==(IService& a, IService& b){
	return &a==&b;
}

#endif